import { createRouter, createWebHistory } from 'vue-router'
import home from '../views/home/index.vue'
import TabBar from '../components/TabBar.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    // component: home
    components: {
      default:home,
      footer:TabBar
    },
  },
  {
    path: '/kind',
    name: 'kind',
    // component: () => import('../views/kind/index.vue')
    components: {
      default:() => import('../views/kind/index.vue'),
      footer:TabBar
    }
  },
  {
    path: '/user',
    name: 'user',
    // component: () => import('../views/kind/index.vue')
    components: {
      default:() => import('../views/user/index.vue'),
      footer:TabBar
    }
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import('../views/cart/index.vue')
  },
  {
    path: '/detail/:id',
    name: 'detail',
    component: () => import('../views/detail/index.vue')
  },
  {
    path: '/order',
    name: 'order',
    component: () => import('../views/order/index.vue')
  },
]
const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})
export default router
